// 带任何参数的类 装饰器
function FirstClassDecorator(params: any) {
  console.log(params);
  return function (targetClass: any) {
    let targetClassObject = new targetClass();
    targetClassObject.buy();
    console.log('targetClass.name==', targetClass.name);
  };
}
// @FirstClassDecorator 不用写成@FirstClassDecorator（name）进行传参
@FirstClassDecorator('我是用来修饰CustomerService22 类的装饰器参数11')
class CustomerService {
  name: string = '李明2';
  constructor() {}
  buy() {
    console.log(this.name + '购买');
  }
  placeOrder() {
    console.log(this.name + '下单购买');
  }
}
